package com.hu.common.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 留言表
 * </p>
 *
 * @author hu
 * @since 2023-09-10
 */
@Data
@ApiModel(value = "Comment对象", description = "留言表")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

      @ApiModelProperty("ID")
      @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

      @ApiModelProperty("内容")
      private String content;

      @ApiModelProperty("评论时间")
      private String time;

      @ApiModelProperty("父ID")
      private Integer pid;

      @ApiModelProperty("最上级评论id")
      private Integer originId;

      @ApiModelProperty("文章id")
      private Integer blogId;

      @ApiModelProperty("评论人id")
      private Integer userId;

      @ApiModelProperty("父级评论人昵称")
      private String pNickName;

      @ApiModelProperty("父级评论人id")
      @TableField(exist = false)
      private String pUserId;

      @ApiModelProperty("评论人昵称")
      @TableField(exist = false)
      private String nickname;

      @ApiModelProperty("评论人头像")
      @TableField(exist = false)
      private String avatarUrl;

      @ApiModelProperty("子评论集合")
      @TableField(exist = false)
      private List<Comment> children;
}
